using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;

namespace Microsoft.Office.Project.EPMSync.Service.Monitor
{
    static class Program
    {
        static Mutex _mutex;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool firstInstance;
            _mutex = new Mutex(false, "Local\\EPMSync.Service.Monitor", out firstInstance);
            // If firstInstance is now true, we're the first instance of the application;
            // otherwise another instance is running.

            if (firstInstance)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new FormMain());
            }
        }
    }
}